Integrand size = 27, antiderivative size = 258 \[ \int \frac {(c+d \sec (e+f x))^3}{\sqrt {a+a \sec (e+f x)}} \, dx=\frac {2 (3 c-d) d^2 \tan (e+f x)}{f \sqrt {a+a \sec (e+f x)}}+\frac {2 d^3 \tan (e+f x)}{f \sqrt {a+a \sec (e+f x)}}-\frac {2 d^3 (1-\sec (e+f x)) \tan (e+f x)}{3 f \sqrt {a+a \sec (e+f x)}}+\frac {2 \sqrt {a} c^3 \text {arctanh}\left (\frac {\sqrt {a-a \sec (e+f x)}}{\sqrt {a}}\right ) \tan (e+f x)}{f \sqrt {a-a \sec (e+f x)} \sqrt {a+a \sec (e+f x)}}-\frac {\sqrt {2} \sqrt {a} (c-d)^3 \text {arctanh}\left (\frac {\sqrt {a-a \sec (e+f x)}}{\sqrt {2} \sqrt {a}}\right ) \tan (e+f x)}{f \sqrt {a-a \sec (e+f x)} \sqrt {a+a \sec (e+f x)}} \]
2*(3*c-d)*d^2*tan(f*x+e)/f/(a+a*sec(f*x+e))^(1/2)+2*d^3*tan(f*x+e)/f/(a+a* sec(f*x+e))^(1/2)-2/3*d^3*(1-sec(f*x+e))*tan(f*x+e)/f/(a+a*sec(f*x+e))^(1/ 2)+2*c^3*arctanh((a-a*sec(f*x+e))^(1/2)/a^(1/2))*a^(1/2)*tan(f*x+e)/f/(a-a *sec(f*x+e))^(1/2)/(a+a*sec(f*x+e))^(1/2)-(c-d)^3*arctanh(1/2*(a-a*sec(f*x +e))^(1/2)*2^(1/2)/a^(1/2))*2^(1/2)*a^(1/2)*tan(f*x+e)/f/(a-a*sec(f*x+e))^ (1/2)/(a+a*sec(f*x+e))^(1/2)
Result contains higher order function than in optimal. Order 5 vs. order 3 in optimal.
Time = 8.07 (sec) , antiderivative size = 787, normalized size of antiderivative = 3.05 \[ \int \frac {(c+d \sec (e+f x))^3}{\sqrt {a+a \sec (e+f x)}} \, dx=\frac {2 \cos \left (\frac {1}{2} (e+f x)\right ) (c+d \sec (e+f x))^3 \sqrt {\frac {1}{1-2 \sin ^2\left (\frac {1}{2} (e+f x)\right )}} \sqrt {1-2 \sin ^2\left (\frac {1}{2} (e+f x)\right )} \left (\frac {2 c \left (c^2+3 d^2\right ) \sin \left (\frac {1}{2} (e+f x)\right )}{3 \left (1-2 \sin ^2\left (\frac {1}{2} (e+f x)\right )\right )^{3/2}}-\frac {4 c^2 (c+3 d) \sin ^3\left (\frac {1}{2} (e+f x)\right )}{3 \left (1-2 \sin ^2\left (\frac {1}{2} (e+f x)\right )\right )^{3/2}}+\frac {4 c \left (c^2+3 d^2\right ) \sin \left (\frac {1}{2} (e+f x)\right )}{3 \sqrt {1-2 \sin ^2\left (\frac {1}{2} (e+f x)\right )}}+\frac {1}{3} c^3 \csc \left (\frac {1}{2} (e+f x)\right ) \sqrt {1-2 \sin ^2\left (\frac {1}{2} (e+f x)\right )} \left (\frac {4 \sin ^4\left (\frac {1}{2} (e+f x)\right )}{\left (1-2 \sin ^2\left (\frac {1}{2} (e+f x)\right )\right )^2}-\frac {6 \sin ^2\left (\frac {1}{2} (e+f x)\right )}{1-2 \sin ^2\left (\frac {1}{2} (e+f x)\right )}+\frac {3 \sqrt {2} \arcsin \left (\sqrt {2} \sin \left (\frac {1}{2} (e+f x)\right )\right ) \sin \left (\frac {1}{2} (e+f x)\right )}{\sqrt {1-2 \sin ^2\left (\frac {1}{2} (e+f x)\right )}}\right )-\frac {(c-d)^3 \csc ^5\left (\frac {1}{2} (e+f x)\right ) \left (-12 \cos ^4\left (\frac {1}{2} (e+f x)\right ) \, _3F_2\left (2,2,\frac {7}{2};1,\frac {9}{2};-\frac {\sin ^2\left (\frac {1}{2} (e+f x)\right )}{1-2 \sin ^2\left (\frac {1}{2} (e+f x)\right )}\right ) \sin ^8\left (\frac {1}{2} (e+f x)\right )-12 \operatorname {Hypergeometric2F1}\left (2,\frac {7}{2},\frac {9}{2},-\frac {\sin ^2\left (\frac {1}{2} (e+f x)\right )}{1-2 \sin ^2\left (\frac {1}{2} (e+f x)\right )}\right ) \sin ^8\left (\frac {1}{2} (e+f x)\right ) \left (4-7 \sin ^2\left (\frac {1}{2} (e+f x)\right )+3 \sin ^4\left (\frac {1}{2} (e+f x)\right )\right )+7 \sqrt {-\frac {\sin ^2\left (\frac {1}{2} (e+f x)\right )}{1-2 \sin ^2\left (\frac {1}{2} (e+f x)\right )}} \left (1-2 \sin ^2\left (\frac {1}{2} (e+f x)\right )\right )^3 \left (15-20 \sin ^2\left (\frac {1}{2} (e+f x)\right )+8 \sin ^4\left (\frac {1}{2} (e+f x)\right )\right ) \left (\left (3-7 \sin ^2\left (\frac {1}{2} (e+f x)\right )\right ) \sqrt {-\frac {\sin ^2\left (\frac {1}{2} (e+f x)\right )}{1-2 \sin ^2\left (\frac {1}{2} (e+f x)\right )}}-3 \text {arctanh}\left (\sqrt {-\frac {\sin ^2\left (\frac {1}{2} (e+f x)\right )}{1-2 \sin ^2\left (\frac {1}{2} (e+f x)\right )}}\right ) \left (1-2 \sin ^2\left (\frac {1}{2} (e+f x)\right )\right )\right )\right )}{63 \left (1-2 \sin ^2\left (\frac {1}{2} (e+f x)\right )\right )^{7/2}}\right )}{f (d+c \cos (e+f x))^3 \sec ^{\frac {5}{2}}(e+f x) \sqrt {a (1+\sec (e+f x))}} \]
(2*Cos[(e + f*x)/2]*(c + d*Sec[e + f*x])^3*Sqrt[(1 - 2*Sin[(e + f*x)/2]^2) ^(-1)]*Sqrt[1 - 2*Sin[(e + f*x)/2]^2]*((2*c*(c^2 + 3*d^2)*Sin[(e + f*x)/2] )/(3*(1 - 2*Sin[(e + f*x)/2]^2)^(3/2)) - (4*c^2*(c + 3*d)*Sin[(e + f*x)/2] ^3)/(3*(1 - 2*Sin[(e + f*x)/2]^2)^(3/2)) + (4*c*(c^2 + 3*d^2)*Sin[(e + f*x )/2])/(3*Sqrt[1 - 2*Sin[(e + f*x)/2]^2]) + (c^3*Csc[(e + f*x)/2]*Sqrt[1 - 2*Sin[(e + f*x)/2]^2]*((4*Sin[(e + f*x)/2]^4)/(1 - 2*Sin[(e + f*x)/2]^2)^2 - (6*Sin[(e + f*x)/2]^2)/(1 - 2*Sin[(e + f*x)/2]^2) + (3*Sqrt[2]*ArcSin[S qrt[2]*Sin[(e + f*x)/2]]*Sin[(e + f*x)/2])/Sqrt[1 - 2*Sin[(e + f*x)/2]^2]) )/3 - ((c - d)^3*Csc[(e + f*x)/2]^5*(-12*Cos[(e + f*x)/2]^4*Hypergeometric PFQ[{2, 2, 7/2}, {1, 9/2}, -(Sin[(e + f*x)/2]^2/(1 - 2*Sin[(e + f*x)/2]^2) )]*Sin[(e + f*x)/2]^8 - 12*Hypergeometric2F1[2, 7/2, 9/2, -(Sin[(e + f*x)/ 2]^2/(1 - 2*Sin[(e + f*x)/2]^2))]*Sin[(e + f*x)/2]^8*(4 - 7*Sin[(e + f*x)/ 2]^2 + 3*Sin[(e + f*x)/2]^4) + 7*Sqrt[-(Sin[(e + f*x)/2]^2/(1 - 2*Sin[(e + f*x)/2]^2))]*(1 - 2*Sin[(e + f*x)/2]^2)^3*(15 - 20*Sin[(e + f*x)/2]^2 + 8 *Sin[(e + f*x)/2]^4)*((3 - 7*Sin[(e + f*x)/2]^2)*Sqrt[-(Sin[(e + f*x)/2]^2 /(1 - 2*Sin[(e + f*x)/2]^2))] - 3*ArcTanh[Sqrt[-(Sin[(e + f*x)/2]^2/(1 - 2 *Sin[(e + f*x)/2]^2))]]*(1 - 2*Sin[(e + f*x)/2]^2))))/(63*(1 - 2*Sin[(e + f*x)/2]^2)^(7/2))))/(f*(d + c*Cos[e + f*x])^3*Sec[e + f*x]^(5/2)*Sqrt[a*(1 + Sec[e + f*x])])
Time = 0.43 (sec) , antiderivative size = 197, normalized size of antiderivative = 0.76, number of steps used = 6, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.185, Rules used = {3042, 4428, 27, 198, 2009}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {(c+d \sec (e+f x))^3}{\sqrt {a \sec (e+f x)+a}} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\left (c+d \csc \left (e+f x+\frac {\pi }{2}\right )\right )^3}{\sqrt {a \csc \left (e+f x+\frac {\pi }{2}\right )+a}}dx\) |
\(\Big \downarrow \) 4428 |
\(\displaystyle -\frac {a^2 \tan (e+f x) \int \frac {\cos (e+f x) (c+d \sec (e+f x))^3}{a (\sec (e+f x)+1) \sqrt {a-a \sec (e+f x)}}d\sec (e+f x)}{f \sqrt {a-a \sec (e+f x)} \sqrt {a \sec (e+f x)+a}}\) |
\(\Big \downarrow \) 27 |
\(\displaystyle -\frac {a \tan (e+f x) \int \frac {\cos (e+f x) (c+d \sec (e+f x))^3}{(\sec (e+f x)+1) \sqrt {a-a \sec (e+f x)}}d\sec (e+f x)}{f \sqrt {a-a \sec (e+f x)} \sqrt {a \sec (e+f x)+a}}\) |
\(\Big \downarrow \) 198 |
\(\displaystyle -\frac {a \tan (e+f x) \int \left (\frac {\cos (e+f x) c^3}{\sqrt {a-a \sec (e+f x)}}+\frac {(3 c-d) d^2}{\sqrt {a-a \sec (e+f x)}}+\frac {d^3 \sec (e+f x)}{\sqrt {a-a \sec (e+f x)}}-\frac {(c-d)^3}{(\sec (e+f x)+1) \sqrt {a-a \sec (e+f x)}}\right )d\sec (e+f x)}{f \sqrt {a-a \sec (e+f x)} \sqrt {a \sec (e+f x)+a}}\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle -\frac {a \tan (e+f x) \left (\frac {2 d^3 (a-a \sec (e+f x))^{3/2}}{3 a^2}-\frac {2 c^3 \text {arctanh}\left (\frac {\sqrt {a-a \sec (e+f x)}}{\sqrt {a}}\right )}{\sqrt {a}}+\frac {\sqrt {2} (c-d)^3 \text {arctanh}\left (\frac {\sqrt {a-a \sec (e+f x)}}{\sqrt {2} \sqrt {a}}\right )}{\sqrt {a}}-\frac {2 d^2 (3 c-d) \sqrt {a-a \sec (e+f x)}}{a}-\frac {2 d^3 \sqrt {a-a \sec (e+f x)}}{a}\right )}{f \sqrt {a-a \sec (e+f x)} \sqrt {a \sec (e+f x)+a}}\) |
-((a*((-2*c^3*ArcTanh[Sqrt[a - a*Sec[e + f*x]]/Sqrt[a]])/Sqrt[a] + (Sqrt[2 ]*(c - d)^3*ArcTanh[Sqrt[a - a*Sec[e + f*x]]/(Sqrt[2]*Sqrt[a])])/Sqrt[a] - (2*(3*c - d)*d^2*Sqrt[a - a*Sec[e + f*x]])/a - (2*d^3*Sqrt[a - a*Sec[e + f*x]])/a + (2*d^3*(a - a*Sec[e + f*x])^(3/2))/(3*a^2))*Tan[e + f*x])/(f*Sq rt[a - a*Sec[e + f*x]]*Sqrt[a + a*Sec[e + f*x]]))
3.2.66.3.1 Defintions of rubi rules used
Int[(a_)*(Fx_), x_Symbol] :> Simp[a Int[Fx, x], x] /; FreeQ[a, x] && !Ma tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_)*((e_.) + (f_.)*(x_) )^(p_)*((g_.) + (h_.)*(x_))^(q_), x_] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d*x)^n*(e + f*x)^p*(g + h*x)^q, x], x] /; FreeQ[{a, b, c, d, e, f, g, h, m, n}, x] && IntegersQ[p, q]
Int[(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_.)*(csc[(e_.) + (f_.)*(x_)]*( d_.) + (c_))^(n_.), x_Symbol] :> Simp[a^2*(Cot[e + f*x]/(f*Sqrt[a + b*Csc[e + f*x]]*Sqrt[a - b*Csc[e + f*x]])) Subst[Int[(a + b*x)^(m - 1/2)*((c + d *x)^n/(x*Sqrt[a - b*x])), x], x, Csc[e + f*x]], x] /; FreeQ[{a, b, c, d, e, f, m, n}, x] && NeQ[b*c - a*d, 0] && EqQ[a^2 - b^2, 0] && NeQ[c^2 - d^2, 0 ] && IntegerQ[m - 1/2]
Leaf count of result is larger than twice the leaf count of optimal. \(508\) vs. \(2(227)=454\).
Time = 5.60 (sec) , antiderivative size = 509, normalized size of antiderivative = 1.97
method | result | size |
parts | \(-\frac {c^{3} \sqrt {a \left (\sec \left (f x +e \right )+1\right )}\, \sqrt {-\frac {\cos \left (f x +e \right )}{\cos \left (f x +e \right )+1}}\, \left (\sqrt {2}\, \ln \left (\csc \left (f x +e \right )-\cot \left (f x +e \right )+\sqrt {\cot \left (f x +e \right )^{2}-2 \csc \left (f x +e \right ) \cot \left (f x +e \right )+\csc \left (f x +e \right )^{2}-1}\right )-2 \,\operatorname {arctanh}\left (\frac {\sin \left (f x +e \right )}{\left (\cos \left (f x +e \right )+1\right ) \sqrt {-\frac {\cos \left (f x +e \right )}{\cos \left (f x +e \right )+1}}}\right )\right )}{f a}+\frac {d^{3} \sqrt {-\frac {2 a}{\left (1-\cos \left (f x +e \right )\right )^{2} \csc \left (f x +e \right )^{2}-1}}\, \left (3 \ln \left (\csc \left (f x +e \right )-\cot \left (f x +e \right )+\sqrt {\left (1-\cos \left (f x +e \right )\right )^{2} \csc \left (f x +e \right )^{2}-1}\right ) \left (\left (1-\cos \left (f x +e \right )\right )^{2} \csc \left (f x +e \right )^{2}-1\right )^{\frac {3}{2}}-4 \left (1-\cos \left (f x +e \right )\right )^{3} \csc \left (f x +e \right )^{3}\right )}{3 f a \left (\left (1-\cos \left (f x +e \right )\right )^{2} \csc \left (f x +e \right )^{2}-1\right )}+\frac {3 c^{2} d \sqrt {-\frac {\cos \left (f x +e \right )}{\cos \left (f x +e \right )+1}}\, \sqrt {a \left (\sec \left (f x +e \right )+1\right )}\, \sqrt {2}\, \ln \left (\csc \left (f x +e \right )-\cot \left (f x +e \right )+\sqrt {\cot \left (f x +e \right )^{2}-2 \csc \left (f x +e \right ) \cot \left (f x +e \right )+\csc \left (f x +e \right )^{2}-1}\right )}{f a}-\frac {3 c \,d^{2} \sqrt {a \left (\sec \left (f x +e \right )+1\right )}\, \left (\sqrt {2}\, \sqrt {-\frac {\cos \left (f x +e \right )}{\cos \left (f x +e \right )+1}}\, \ln \left (\csc \left (f x +e \right )-\cot \left (f x +e \right )+\sqrt {\cot \left (f x +e \right )^{2}-2 \csc \left (f x +e \right ) \cot \left (f x +e \right )+\csc \left (f x +e \right )^{2}-1}\right )+2 \cot \left (f x +e \right )-2 \csc \left (f x +e \right )\right )}{f a}\) | \(509\) |
default | \(\frac {\left (3 \left (\left (1-\cos \left (f x +e \right )\right )^{2} \csc \left (f x +e \right )^{2}-1\right )^{\frac {3}{2}} \sqrt {2}\, \operatorname {arctanh}\left (\frac {\sqrt {2}\, \left (-\cot \left (f x +e \right )+\csc \left (f x +e \right )\right )}{\sqrt {\left (1-\cos \left (f x +e \right )\right )^{2} \csc \left (f x +e \right )^{2}-1}}\right ) c^{3}-3 \left (\left (1-\cos \left (f x +e \right )\right )^{2} \csc \left (f x +e \right )^{2}-1\right )^{\frac {3}{2}} \ln \left (\csc \left (f x +e \right )-\cot \left (f x +e \right )+\sqrt {\left (1-\cos \left (f x +e \right )\right )^{2} \csc \left (f x +e \right )^{2}-1}\right ) c^{3}+9 \left (\left (1-\cos \left (f x +e \right )\right )^{2} \csc \left (f x +e \right )^{2}-1\right )^{\frac {3}{2}} \ln \left (\csc \left (f x +e \right )-\cot \left (f x +e \right )+\sqrt {\left (1-\cos \left (f x +e \right )\right )^{2} \csc \left (f x +e \right )^{2}-1}\right ) c^{2} d -9 \left (\left (1-\cos \left (f x +e \right )\right )^{2} \csc \left (f x +e \right )^{2}-1\right )^{\frac {3}{2}} \ln \left (\csc \left (f x +e \right )-\cot \left (f x +e \right )+\sqrt {\left (1-\cos \left (f x +e \right )\right )^{2} \csc \left (f x +e \right )^{2}-1}\right ) c \,d^{2}+3 \left (\left (1-\cos \left (f x +e \right )\right )^{2} \csc \left (f x +e \right )^{2}-1\right )^{\frac {3}{2}} \ln \left (\csc \left (f x +e \right )-\cot \left (f x +e \right )+\sqrt {\left (1-\cos \left (f x +e \right )\right )^{2} \csc \left (f x +e \right )^{2}-1}\right ) d^{3}+18 c \,d^{2} \left (1-\cos \left (f x +e \right )\right )^{3} \csc \left (f x +e \right )^{3}-4 d^{3} \left (1-\cos \left (f x +e \right )\right )^{3} \csc \left (f x +e \right )^{3}-18 c \,d^{2} \left (-\cot \left (f x +e \right )+\csc \left (f x +e \right )\right )\right ) \sqrt {-\frac {2 a}{\left (1-\cos \left (f x +e \right )\right )^{2} \csc \left (f x +e \right )^{2}-1}}}{3 f a \left (-\cot \left (f x +e \right )+\csc \left (f x +e \right )+1\right ) \left (-\cot \left (f x +e \right )+\csc \left (f x +e \right )-1\right )}\) | \(512\) |
-c^3/f/a*(a*(sec(f*x+e)+1))^(1/2)*(-cos(f*x+e)/(cos(f*x+e)+1))^(1/2)*(2^(1 /2)*ln(csc(f*x+e)-cot(f*x+e)+(cot(f*x+e)^2-2*csc(f*x+e)*cot(f*x+e)+csc(f*x +e)^2-1)^(1/2))-2*arctanh(sin(f*x+e)/(cos(f*x+e)+1)/(-cos(f*x+e)/(cos(f*x+ e)+1))^(1/2)))+1/3*d^3/f/a*(-2*a/((1-cos(f*x+e))^2*csc(f*x+e)^2-1))^(1/2)* (3*ln(csc(f*x+e)-cot(f*x+e)+((1-cos(f*x+e))^2*csc(f*x+e)^2-1)^(1/2))*((1-c os(f*x+e))^2*csc(f*x+e)^2-1)^(3/2)-4*(1-cos(f*x+e))^3*csc(f*x+e)^3)/((1-co s(f*x+e))^2*csc(f*x+e)^2-1)+3*c^2*d/f/a*(-cos(f*x+e)/(cos(f*x+e)+1))^(1/2) *(a*(sec(f*x+e)+1))^(1/2)*2^(1/2)*ln(csc(f*x+e)-cot(f*x+e)+(cot(f*x+e)^2-2 *csc(f*x+e)*cot(f*x+e)+csc(f*x+e)^2-1)^(1/2))-3*c*d^2/f/a*(a*(sec(f*x+e)+1 ))^(1/2)*(2^(1/2)*(-cos(f*x+e)/(cos(f*x+e)+1))^(1/2)*ln(csc(f*x+e)-cot(f*x +e)+(cot(f*x+e)^2-2*csc(f*x+e)*cot(f*x+e)+csc(f*x+e)^2-1)^(1/2))+2*cot(f*x +e)-2*csc(f*x+e))
Time = 7.80 (sec) , antiderivative size = 619, normalized size of antiderivative = 2.40 \[ \int \frac {(c+d \sec (e+f x))^3}{\sqrt {a+a \sec (e+f x)}} \, dx=\left [-\frac {3 \, \sqrt {2} {\left ({\left (a c^{3} - 3 \, a c^{2} d + 3 \, a c d^{2} - a d^{3}\right )} \cos \left (f x + e\right )^{2} + {\left (a c^{3} - 3 \, a c^{2} d + 3 \, a c d^{2} - a d^{3}\right )} \cos \left (f x + e\right )\right )} \sqrt {-\frac {1}{a}} \log \left (-\frac {2 \, \sqrt {2} \sqrt {\frac {a \cos \left (f x + e\right ) + a}{\cos \left (f x + e\right )}} \sqrt {-\frac {1}{a}} \cos \left (f x + e\right ) \sin \left (f x + e\right ) - 3 \, \cos \left (f x + e\right )^{2} - 2 \, \cos \left (f x + e\right ) + 1}{\cos \left (f x + e\right )^{2} + 2 \, \cos \left (f x + e\right ) + 1}\right ) + 6 \, {\left (c^{3} \cos \left (f x + e\right )^{2} + c^{3} \cos \left (f x + e\right )\right )} \sqrt {-a} \log \left (\frac {2 \, a \cos \left (f x + e\right )^{2} + 2 \, \sqrt {-a} \sqrt {\frac {a \cos \left (f x + e\right ) + a}{\cos \left (f x + e\right )}} \cos \left (f x + e\right ) \sin \left (f x + e\right ) + a \cos \left (f x + e\right ) - a}{\cos \left (f x + e\right ) + 1}\right ) - 4 \, {\left (d^{3} + {\left (9 \, c d^{2} - d^{3}\right )} \cos \left (f x + e\right )\right )} \sqrt {\frac {a \cos \left (f x + e\right ) + a}{\cos \left (f x + e\right )}} \sin \left (f x + e\right )}{6 \, {\left (a f \cos \left (f x + e\right )^{2} + a f \cos \left (f x + e\right )\right )}}, -\frac {6 \, {\left (c^{3} \cos \left (f x + e\right )^{2} + c^{3} \cos \left (f x + e\right )\right )} \sqrt {a} \arctan \left (\frac {\sqrt {\frac {a \cos \left (f x + e\right ) + a}{\cos \left (f x + e\right )}} \cos \left (f x + e\right )}{\sqrt {a} \sin \left (f x + e\right )}\right ) - 2 \, {\left (d^{3} + {\left (9 \, c d^{2} - d^{3}\right )} \cos \left (f x + e\right )\right )} \sqrt {\frac {a \cos \left (f x + e\right ) + a}{\cos \left (f x + e\right )}} \sin \left (f x + e\right ) - \frac {3 \, \sqrt {2} {\left ({\left (a c^{3} - 3 \, a c^{2} d + 3 \, a c d^{2} - a d^{3}\right )} \cos \left (f x + e\right )^{2} + {\left (a c^{3} - 3 \, a c^{2} d + 3 \, a c d^{2} - a d^{3}\right )} \cos \left (f x + e\right )\right )} \arctan \left (\frac {\sqrt {2} \sqrt {\frac {a \cos \left (f x + e\right ) + a}{\cos \left (f x + e\right )}} \cos \left (f x + e\right )}{\sqrt {a} \sin \left (f x + e\right )}\right )}{\sqrt {a}}}{3 \, {\left (a f \cos \left (f x + e\right )^{2} + a f \cos \left (f x + e\right )\right )}}\right ] \]
[-1/6*(3*sqrt(2)*((a*c^3 - 3*a*c^2*d + 3*a*c*d^2 - a*d^3)*cos(f*x + e)^2 + (a*c^3 - 3*a*c^2*d + 3*a*c*d^2 - a*d^3)*cos(f*x + e))*sqrt(-1/a)*log(-(2* sqrt(2)*sqrt((a*cos(f*x + e) + a)/cos(f*x + e))*sqrt(-1/a)*cos(f*x + e)*si n(f*x + e) - 3*cos(f*x + e)^2 - 2*cos(f*x + e) + 1)/(cos(f*x + e)^2 + 2*co s(f*x + e) + 1)) + 6*(c^3*cos(f*x + e)^2 + c^3*cos(f*x + e))*sqrt(-a)*log( (2*a*cos(f*x + e)^2 + 2*sqrt(-a)*sqrt((a*cos(f*x + e) + a)/cos(f*x + e))*c os(f*x + e)*sin(f*x + e) + a*cos(f*x + e) - a)/(cos(f*x + e) + 1)) - 4*(d^ 3 + (9*c*d^2 - d^3)*cos(f*x + e))*sqrt((a*cos(f*x + e) + a)/cos(f*x + e))* sin(f*x + e))/(a*f*cos(f*x + e)^2 + a*f*cos(f*x + e)), -1/3*(6*(c^3*cos(f* x + e)^2 + c^3*cos(f*x + e))*sqrt(a)*arctan(sqrt((a*cos(f*x + e) + a)/cos( f*x + e))*cos(f*x + e)/(sqrt(a)*sin(f*x + e))) - 2*(d^3 + (9*c*d^2 - d^3)* cos(f*x + e))*sqrt((a*cos(f*x + e) + a)/cos(f*x + e))*sin(f*x + e) - 3*sqr t(2)*((a*c^3 - 3*a*c^2*d + 3*a*c*d^2 - a*d^3)*cos(f*x + e)^2 + (a*c^3 - 3* a*c^2*d + 3*a*c*d^2 - a*d^3)*cos(f*x + e))*arctan(sqrt(2)*sqrt((a*cos(f*x + e) + a)/cos(f*x + e))*cos(f*x + e)/(sqrt(a)*sin(f*x + e)))/sqrt(a))/(a*f *cos(f*x + e)^2 + a*f*cos(f*x + e))]
\[ \int \frac {(c+d \sec (e+f x))^3}{\sqrt {a+a \sec (e+f x)}} \, dx=\int \frac {\left (c + d \sec {\left (e + f x \right )}\right )^{3}}{\sqrt {a \left (\sec {\left (e + f x \right )} + 1\right )}}\, dx \]
\[ \int \frac {(c+d \sec (e+f x))^3}{\sqrt {a+a \sec (e+f x)}} \, dx=\int { \frac {{\left (d \sec \left (f x + e\right ) + c\right )}^{3}}{\sqrt {a \sec \left (f x + e\right ) + a}} \,d x } \]
Exception generated. \[ \int \frac {(c+d \sec (e+f x))^3}{\sqrt {a+a \sec (e+f x)}} \, dx=\text {Exception raised: TypeError} \]
Exception raised: TypeError >> an error occurred running a Giac command:IN PUT:sage2:=int(sage0,sageVARx):;OUTPUT:index.cc index_m i_lex_is_greater E rror: Bad Argument Value
Timed out. \[ \int \frac {(c+d \sec (e+f x))^3}{\sqrt {a+a \sec (e+f x)}} \, dx=\int \frac {{\left (c+\frac {d}{\cos \left (e+f\,x\right )}\right )}^3}{\sqrt {a+\frac {a}{\cos \left (e+f\,x\right )}}} \,d x \]